const system_info = uni.getSystemInfoSync();
// console.log(system_info)
export const getWindowWidth = () => { return system_info.windowWidth }; 
export const getWindowHeight = () => { return system_info.windowHeight };
export const getStatusBarHeight = () => {return system_info.statusBarHeight || 15};

export const getTitleBarHeight = () => {
	if(uni.getMenuButtonBoundingClientRect){
		let {top, height} = uni.getMenuButtonBoundingClientRect();
		let titleBarHeight = height + (top - getStatusBarHeight()) * 2;
		return titleBarHeight;
	}else{
		return 40;
	}
}

export const getNavBarHeight = () => {
	return getStatusBarHeight() + getTitleBarHeight();
}


